GO 
DECLARE 
@backupTime VARCHAR(20)
DECLARE 
@fileName VARCHAR(1000)  
SELECT
 @backupTime=(CONVERT(VARCHAR(8), GETDATE(), 112) +REPLACE(CONVERT(VARCHAR(5), GETDATE(), 114), ':', ''))  
SELECT
 @fileName='c:\Database_Backup\DB_'+@backupTime+'.bak'
backup database OnlineExam to disk=@fileName